﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@model sipfe.model.dataAccess.SIPMaePersona
@using Resources;
@using sipfe.util;
@{   
    Layout = "~/Views/Shared/Layaout/general/_LayoutPopGeneral.cshtml";        
}

<script type="text/javascript" language="javascript" src="@Url.Content(@properties.nuevoJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.personaJS)" ></script>

<script type="text/javascript">
    $(function () {
        //calendarFechaFuturo('dtFecNacim', '1');        
        calendarioFechaNac('dtFecNacim');
    });
    
</script>
<br/>
@using (Html.BeginForm("AddNuevaPersonaPoPup", "DatosPersonales", FormMethod.Post))
{
 @Html.ValidationSummary(false,"Los Siguientes Campos son Obligatorios:")

<fieldset style="width: 760px;" class="fieldsetStyle1">
    <legend class="tituloBlue9">Registrar Nueva Persona Natural</legend>
    <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0">
        <tbody>
            <tr>                
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tbody class="tituloCelesteN8">
                        <tr>
                            <td>País Emisor<span class="asterisco">(*)</span></td>
                            <td>Tipo documento<span class="asterisco">(*)</span></td>
                            <td>Número documento<span class="asterisco">(*)</span></td>                            
                            <td>Fecha Nacimiento<span class="asterisco">(*)</span></td>
                            <td>Género<span class="asterisco">(*)</span></td>
                        </tr>
                        <tr>
                            <td>
                                @Html.DropDownList("nIdeCodPaisDoc", (IEnumerable<SelectListItem>)ViewBag.PaisEmisor, "--Seleccione--", new { @class = "select8" })                                
		                    </td>                            
                            <td>@Html.DropDownList("nIdeTipoDocum", (IEnumerable<SelectListItem>)ViewBag.TipoDocIdent, "--Seleccione--", new { @class = "select8" }) 
                                
		                    </td>
                            <td>
                                @Html.TextBoxFor(model => model.vNumDocum, new { @class = "textBoxMay", style = "width:120px;text-transform:none;", maxlength = 20, onkeypress = "return validaAlfaNumTamanio(this,event,20);", onpaste = "return false;", onblur = "javascript:onBlurUpper(this); validaDNIPersona(this);" })
		                    </td>
                            <td>
                                @Html.TextBoxFor(model => model.dtFecNacim, new { style = "width:60px;text-transform:none;", maxlength = 10, readOnly = true })                                 
		                    </td>
                            <td>
                                @Html.DropDownList("nIdeTipoGenero", (IEnumerable<SelectListItem>)ViewBag.Genero, "--Seleccione--", new { @class = "select8" })                                 
		                    </td>
                        </tr>
                        <tr xalign="center">
                            <td>Primer nombre<span class="asterisco">(*)</span></td>
                            <td>Segundo nombre</td>
                            <td>Apellido paterno<span class="asterisco">(*)</span></td>
                            <td>Apellido materno<span class="asterisco">(*)</span></td>
                            <td>Estado civil<span class="asterisco">(*)</span></td>
                        </tr>
                        <tr>
                            <td>
                                @Html.TextBoxFor(model => model.vPriNombre, new { style = "width:120px;", maxlength = 120 })                                 
		                    </td>
                            <td>
                                @Html.TextBoxFor(model => model.vSegNombre, new { style = "width:120px;", maxlength = 120 })                                 
		                    </td>
                            <td>@Html.TextBoxFor(model => model.vPriApellido, new { style = "width:120px;", maxlength = 120 }) 
                                
		                    </td>
                            <td>@Html.TextBoxFor(model => model.vSegApellido, new { style = "width:120px;", maxlength = 120 }) 
                                
		                    </td>
                            <td>
                                @Html.DropDownListFor(model => model.SIPDetEstadoCivil1.nIdeEstadoCivil, (IEnumerable<SelectListItem>)ViewBag.EstadoCivil, "--Seleccione--", new { @class = "select8" }) 
                                
		                    </td>
                            
                        </tr>
                        <tr>
                            <td>País nacimiento<span class="asterisco">(*)</span></td>
                            <td>Región nacimiento</td>
                            <td>Provincia nacimiento</td>
                            <td colspan="2">Distrito nacimiento</td>
                        </tr>
                        <tr>
                            <td>@Html.DropDownList("nIdePaisNac", (IEnumerable<SelectListItem>)ViewBag.PaisEmisor, "--Seleccione--", new { @class = "select8" })</td>                            
                            <td>@Html.DropDownList("nIdeRegionNac", (IEnumerable<SelectListItem>)ViewBag.Regiones, "--Seleccione--", new { @class = "select8" , onchange="javascript:cargaUbigeo(this,'1');" })</td>
                            <td>
                                <div id="divProvincias">
                                    <select id="nIdeProvNac" name="nIdeProvNac" style="width:120px;" >
                                        <option value="">--Seleccione--</option>
                                    </select>
                                </div>
                            </td>
                            <td colspan="2">
                                <div id="divDistritos">
                                    <select id="nIdeDistritoNac" name="nIdeDistritoNac" style="width:120px;" >
                                        <option value="">--Seleccione--</option>
                                    </select>
                                </div>
                            </td>                           
                        </tr>
                        <tr>
                            <td>Teléfono Fijo</td>
                            <td>Teléfono Celular</td>
                            <td>Correo Electrónico 1</td>
                            <td>Correo Electrónico 2</td>
                            <td>&nbsp;</td>
                        </tr>
                        <tr>
                            <td>                              
                                @Html.TextBoxFor(model => model.vTelefono1, new { style = "width:120px;", maxlength = 20 })                                 
                            </td>
                            <td>
                                @Html.TextBoxFor(model => model.vTelefono2, new { style = "width:120px;", maxlength = 20 }) 
                            </td>
                            <td>
                                 @Html.TextBoxFor(model => model.vEmail, new { style = "width:120px;", maxlength = 20 })
                            </td>
                            <td>
                                <input type="text"   id="vNumDocumento" name="vNumDocumento"  style="width:170px;"  />
                            </td>
                            <td>&nbsp;</td>
                        </tr>
                        
                    </tbody>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
</fieldset>
    @Html.Hidden("nIdeTipoPer", Constante.getInstance().N_IDE_DETALLE_TIPO_PERSONA_INTERNA)
    @Html.Hidden("nIdeUsuReg", @Session[Constante.N_IDE_USUARIO])
    @Html.Hidden("dtFecReg", @DateTime.Now.ToString())

    @Html.Hidden("SIPDetEstadoCivil1.dFecIniVig", @DateTime.Now.ToString())
    @Html.Hidden("SIPDetEstadoCivil1.nIdeUsuReg", @Session[Constante.N_IDE_USUARIO])

<br />
<fieldset style="width: 760px;" class="fieldsetStyle1">
    <legend class="tituloBlue9">Registrar Dirección</legend>
    <table border="1" style="width: 100%;" cellpadding="0" cellspacing="0" xclass="tablaDetalle1">
        <tbody>
            <tr>
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" class="tituloCelesteN8">
                        <tr>
                            <td>Tipo de Vía<span class="asterisco">(*)</span></td>
                            <td style="width: 10px;">&nbsp;</td>
                            <td>Nombre de la Vía<span class="asterisco">(*)</span></td>
                            <td style="width: 10px;">&nbsp;</td>
                            <td># Puerta</td>
                            <td>&nbsp;</td>
                            <td>Letra</td>
                        </tr>
                        <tr>
                            <td>
                                @Html.DropDownList("SIPDetDireccion1.nIdeTipoVia", (IEnumerable<SelectListItem>)ViewBag.Genero, "--Seleccione--", new { @class = "select8" })                                 
		                    </td>
                            <td>&nbsp;</td>
                            <td>
                               @Html.TextBoxFor(model => model.SIPDetDireccion1.vNomVia , new { style = "width:120px;", maxlength = 20 }) 
                            </td>
                            <td>&nbsp;</td>
                            <td>
                                 xxx
                            </td>
                            <td align="center">-</td>
                            <td>
                                <input type="text" id="fechaNac2" name="fechaNac2" style="width: 30px;" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr><td>&nbsp;</td></tr>
            <tr>
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" class="tituloCelesteN8">
                        <tr>
                            <td>Tipo de Zona</td>
                            <td style="width:10px;">&nbsp;</td> 
                            <td colspan="2">Nombre de la Zona</td>                            
                            <td style="width:10px;">&nbsp;</td>                          
                            <td>Centro Poblado</td>
                        </tr>
                        <tr>
                            <td>
                                 @Html.DropDownList("SIPDetDireccion1.nIdeTipoZona", (IEnumerable<SelectListItem>)ViewBag.Genero, "--Seleccione--", new { @class = "select8" })                                 
                            </td>
                            
                            <td>&nbsp;</td>                           
                            <td colspan="2">
                                @Html.TextBoxFor(model => model.SIPDetDireccion1.vNomZona , new { style = "width:120px;", maxlength = 20 })
                            </td>
                            <td>&nbsp;</td>                           
                            <td>
                                @Html.TextBoxFor(model => model.SIPDetDireccion1.vCenPoblado , new { style = "width:120px;", maxlength = 20 })
                            </td>                                                        
                        </tr>
                    </table>
                </td>
            </tr>
            <tr><td>&nbsp;</td></tr>
            <tr>
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" style="width:100%;" class="tituloCelesteN8">
                        <tr>
                            <td style="width:40px;">Block</td>
                            <td style="width:40px;">Piso</td>
                            <td style="width:60px;">Interior</td>
                            <td style="width:60px;">Manzana</td>
                            <td style="width:60px;">Lote</td>
                            <td style="width:70px;">Kilometro</td>
                            <td>Referencia</td>
                        </tr>
                        <tr>
                            <td>
                                @Html.TextBoxFor(model => model.SIPDetDireccion1.vNumBlock , new { style = "width:20px;", maxlength = 20 })
                            </td>
                            <td>
                               bbb
                            </td>
                            <td>
                                 <input type="text"   id="vNumDocumento" name="vNumDocumento"  style="width:40px;"   />
                            </td>
                            <td>
                                ccc
                            </td>
                            <td>
                                 ggg
                            </td>
                            <td>
                                rrrr
                            </td>
                            <td>
                                wwww
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr><td>&nbsp;</td></tr>
            <tr>
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" style="width:760px;" class="tituloCelesteN8" id="tblubi">
                        <tr>                           
                            <td>Región / Departamento</td>
                            <td>Provincia</td>
                            <td>Distrito</td>
                        </tr>
                        <tr>
                            <td>@Html.DropDownList("nIdeRegionNac", (IEnumerable<SelectListItem>)ViewBag.Regiones, "--Seleccione--", new { @class = "select8" , onchange="javascript:cargaUbigeo(this,'3');" })</td>
                            <td>
                                <div id="divProvinciasDir">
                                    <select id="nIdeProvDir" name="nIdeProvDir" style="width:120px;" >
                                        <option value="">--Seleccione--</option>
                                    </select>
                                </div>
                            </td>
                            <td colspan="2">
                                <div id="divDistritosDir">
                                    <select id="nIdeDistritoDir" name="nIdeDistritoDir" style="width:120px;" >
                                        <option value="">--Seleccione--</option>
                                    </select>
                                </div>
                            </td> 
                            
                        </tr>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
</fieldset>
    <table border="1" cellpadding="10" cellspacing="0" style="width:100%;">
        <tr align="center">
            <td width="20%"><b>Campo Obligatorio:</b>&nbsp;<span class="asterisco">(*)</span></td>
            <td width="80%"><input type="button" value="Registrar Datos" onclick="javascript: addNuevaPersonaFinal(this.form);" /></td>
        </tr>
    </table> 
    @Html.Hidden("SIPDetDireccion1.nIdeUsuReg", @Session[Constante.N_IDE_USUARIO])   
}